package com.eric.controller;

import com.alibaba.fastjson.JSON;
import com.eric.req.BasePostReq;
import com.eric.resp.BaseResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: liuBing
 * @create: 2023-08-15 17:21
 **/
@RestController
@RequestMapping("TestWeb")
@Slf4j
@Api("基础控制器")
public class TestWeb {

    @ApiOperation("post 请求基础接口")
    @PostMapping("post")
    public BaseResp<Object> post(@Validated @RequestBody BasePostReq req){
        log.info(JSON.toJSONString(req));
        return null;
    }

}
